package unibz.thaison.iosa;

import java.util.ArrayList;

import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement
public class TrelloBoard 
{
	private String boardId;
	private String boardName;
	private String boardDescription;
	private String boardUrl;
	private ArrayList<Member> members = new ArrayList<Member>();
	private ArrayList<TrelloList> lists = new ArrayList<TrelloList>();
	private ArrayList<Action> actions = new ArrayList<Action>();
	
	public TrelloBoard()
	{
	}
	
	public void setBoardId(String id)
	{
		boardId = id;
	}
	public String getBoardId()
	{
		return boardId;
	}
	
	public void setBoardName(String name)
	{
		boardName = name;
	}
	
	public String getBoardName()
	{
		return boardName;
	}
	
	public void setBoardDescription(String desc)
	{
		boardDescription = desc;
	}
	
	public String getBoardDescription()
	{
		return boardDescription;
	}
	
	public void setBoardUrl(String url)
	{
		boardUrl = url;
	}
	
	public String getBoardUrl()
	{
		return boardUrl;
	}
	
	public void addMember(Member mem)
	{
		members.add(mem);
	}
	public ArrayList<Member> getMembers()
	{
		return members;
	}
	public String getMemberNameById(String id)
	{
		for (Member mem : members)
		{
			if (mem.getId().equals(id))
				return mem.getFullname();
		}
		return "";
	}
	
	public void addList(TrelloList list)
	{
		lists.add(list);
	}
	
	public ArrayList<TrelloList> getLists()
	{
		return lists;
	}
	
	public TrelloList getTrelloListById(String id)
	{
		for (TrelloList list : lists)
		{
			if (list.getId().equals(id))
				return list;
		}
		return null;
	}
	
	public void addAction(Action action)
	{
		actions.add(action);
	}
	
	public ArrayList<Action> getActions()
	{
		return actions;
	}
}
















